package com.lisa.passjava.member.controller;

import com.lisa.common.utils.R;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

//开启动态刷新配置
@RefreshScope
@RestController
@RequestMapping("/member/sample")
public class TestController {

    @Value("${member.nick}")
    private String nick;

    @Value("${member.age}")
    private String age;

    @RequestMapping("/testNacosConfig")
    public R testNacosConfig(){
        return R.ok().put("nick",nick).put("age",age);
    }
}
